package org.example.code.service.impl;

import org.example.code.dao.test.TestDaoInterface;
import org.example.code.service.TestService;
import org.example.testspring.annotation.Autowired;
import org.example.testspring.annotation.Component;

@Component("testService")
public class TestServiceImpl implements TestService {

    @Autowired
    TestDaoInterface testDaoInterface;

    @Override
    public void saySomething(){
        System.out.println(testDaoInterface.getStr());
    }

    public void setTestDaoInterface(TestDaoInterface testDaoInterface) {
        this.testDaoInterface = testDaoInterface;
    }

    @Override
    public void sayHello(){
        System.out.println("hello");
    }

    public void init(){
        System.out.println("init");
    }

    public void destroy(){
        System.out.println("destroy");
    }
}
